<?
//inculde即可以使用data数据。本页所有的data数据，倾在controller都处理好
include_once("../../../common/module/checkA.php");
include_once("../../../../config.php");
include_once("../controller/task-themes-detail-list.php");
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php include ROOT_PATH_.'/controller/common/module/head.php'; ?>
    <?php include 'modules/head.php'; ?>
    <link href="../asset/css/style.css" rel="stylesheet" type="text/css"/>
    <style type="text/css">
        .els1{ position: relative; text-indent: 10px;}
        .notice_icon{width: 10px;
            height: 10px;
            display: block;
            position: absolute;
            background: #f00;
            border-radius: 15px;
            top: 0px;}
        .layui-btn{position: relative; }
        .layui-btn .notice_icon{top: 0px;right: 3px;}
    </style>
</head>


<body>

<div id="topbar">
    <?php include ROOT_PATH_.'/controller/common/module/topbar.php'; ?>
</div>

<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_.'/controller/common/module/sidebar.php'; ?>
        </div>





        <div id="content">
                <?php $page_title='任务模板子任务列表';?>
                <?php include ROOT_PATH_.'/controller/common/module/mod-page-title.php'; ?>

            <div class="select-box">
                <form action="detail-list.php" class="layui-form" id="search" >

                    <div class="layui-form-item">
                        <label class="layui-form-label">关键词</label>
                        <div class="layui-input-block">
                            <input type="text" name="select_keywords" placeholder="搜索标题" autocomplete="off" class="layui-input" value="<? echo $_REQUEST['select_keywords']?>" >
                        </div>
                    </div>


                    <button class="layui-btn  layui-btn-sm" ><i class="layui-icon">&#xe615;</i> 查找</button>

                    <a class="layui-btn white  layui-btn-sm" href="task-themes.php?sys_part=task" ><i class="layui-icon">&#x1006;</i> 重置</a>


                    <br class="clearfloat"/>
                </form>


            </div>




            <script>



                layui.use('form', function(){
                    var form = layui.form;


                    form.on('select()', function(data){
                        //提交表单
                        document.getElementById("search").submit();

                    });



                });


            </script>


            <div class="layui-form">

                <a class="layui-btn layui-btn-xs" onclick="windowEject('modules/mod-task-themes-detail-add.php?themes_id=<?php echo $themes_id ;?>')"><i class="layui-icon">&#xe608;</i>  新增</a>
            </div>

            <hr />









<!-- 用$system_part .list_boxes来控制来到确认板块信息显示-->
<div class="list-box">

<div class="list-boxes">







<table class="layui-table">
  <colgroup>
                            <col width="60">
                            <col width="">
                            <col width="">
                            <col width="">
                            <col width="200">





  </colgroup>
  <thead>
    <tr>
      <th>序号</th>
        <th>任务名称</th>
        <th>上一级关联任务</th>
        <th>间隔日期</th>
        <th>执行者</th>
      <th>操作</th>
    </tr>
  </thead>  
  <tbody>





  <?php
	for ($i = 0; $i < $detailnum; $i++) {
    ?>
        <tr id="item<?echo $detail[$i]['nid']?>" >
        <td><?echo $i+1+$plate['page_list_num']*($nowpageid-1) ?>
        <? //echo count_days(date("Y-m-d"),$detail[$i]['enddate'])?>
        </td>
        <td><div class="els1"><?php if($detail[$i]['notice_show'] == 1) {?><i class="notice_icon"></i><?php }?><?echo $detail[$i]['name']?></div></td>
        <td>

            <?php
            $pinfo = select_one_line_all_items($table_Prefix."task_themes_list",' nid = '.$detail[$i]['pid']);
            echo $pinfo['name'];
            ?>
        </td>
            <td>
                <?echo $detail[$i]['days']?>
            </td>
            <td>
                <?
                $principal=select_one_line_all_items($table_Prefix."employee","nid = '".$detail[$i]['principal']."'");
                ?>
                <?echo $principal['name']?>
            </td>

    <td>
<!--  <a href="detail-edit.php?sys_part=task&nid=--><?// echo $detail[$i]['nid']?><!--&nowpageid=--><?//echo $nowpageid?><!--" class="layui-btn  layui-btn-sm" >-->
<!--    <i class="layui-icon">&#xe642;</i>修改-->
<!--  </a>-->
        <a class="layui-btn  layui-btn-sm" onclick="windowEject('modules/mod-task-themes-detail-edit.php?sys_part=task&nid=<? echo $detail[$i]['nid']?>&nowpageid=<? echo $_REQUEST['nowpageid'] ?>&themes_id=<?php echo $themes_id ;?>')">
            <i class="layui-icon">&#xe642;</i>修改
        </a>


    <a href="javascript:void(0)" onclick="delItem (<?php echo $detail[$i]['nid']?>,'task','task-themes-detail-delete.php','task-themes-list.php?sys_part=task&themes_id=<?php echo $themes_id ;?>')"class="delete layui-btn  layui-btn-sm" > <i class="layui-icon">&#xe640;</i>删除
    </a>



  </td>
    </tr>
  <?php
}
?>



  </tbody>
</table>



    <?php
    if ($detailnum == 0)
    {
        echo "数据添加中";
    }
    ?>




</div>



    <div class="list-box-function"
        <? if ($detailnum == 0) {
            echo "style" . "='display:none'";
        } ?>
        >

        <?php include 'modules/page_numbers.php'; ?>

    </div>
</div>


<!--list-box end-->
</div>

<!--content端點01-->
</div>
<!--maincontent端點01-->
<br class="clearfloat"/>
</div>
<!--container端點01-->
</div>







<!--删除box-->
<?php include '../modules/deletebar.php'; ?>
<!--删除box end-->

<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?> </body>

</html>




